#include "thread_pool.hpp"
#include "task.hpp"
#include <time.h>
#include <unistd.h>
#define NUM 5
int main()
{
	srand((unsigned)time(nullptr));
	ThreadPool<Task> *tp = new ThreadPool<Task>(NUM);
	tp->InitThreadPool();
	const char* ops = "+-*/%";
	while(1)
	{
		int x = rand() % 50 + 1;
		int y = rand() % 50 + 1;
		char op = ops[rand()%5];

		Task t(x,y,op);
		tp->PushTask(t);
		sleep(1);
	}
	return 0;
};
